﻿using System;

namespace SIS.Business
{
	/// <summary>
	/// Author: hieunv
	/// </summary>
	[Serializable]
	class Takes : System.Data.DataRow
	{
		/// <summary>
		/// Student ID
		/// </summary>
		public string StudentId
		{
			get
			{
				return (string)this[DataAccess.Takes.STUDENT_ID];
			}
			set
			{
				this[DataAccess.Takes.STUDENT_ID] = value;
			}
		}
		/// <summary>
		/// Course ID
		/// </summary>
		public string CourseId
		{
			get
			{
				return (string)this[DataAccess.Takes.COURSE_ID];
			}
			set
			{
				this[DataAccess.Takes.COURSE_ID] = value;
			}
		}
		/// <summary>
		/// Section ID
		/// </summary>
		public string SectionId
		{
			get
			{
				return (string)this[DataAccess.Takes.SECTION_ID];
			}
			set
			{
				this[DataAccess.Takes.SECTION_ID] = value;
			}
		}
		/// <summary>
		/// Semester
		/// </summary>
		public string Semester
		{
			get
			{
				return (string)this[DataAccess.Takes.SEMESTER];
			}
			set
			{
				this[DataAccess.Takes.SEMESTER] = value;
			}
		}
		/// <summary>
		/// Year
		/// </summary>
		public int Year
		{
			get
			{
				return (int)this[DataAccess.Takes.YEAR];
			}
			set
			{
				this[DataAccess.Takes.YEAR] = value;
			}
		}
		/// <summary>
		/// Grade
		/// </summary>
		public string Grade
		{
			get
			{
				return (string)this[DataAccess.Takes.GRADE];
			}
			set
			{
				this[DataAccess.Takes.GRADE] = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public Takes() : base(null)
		{

		}
		/// <summary>
		/// 
		/// </summary>
		/// <param name="builder"></param>
		public Takes(System.Data.DataRowBuilder builder)
			: base(builder)
		{

		}
		/// <summary>
		/// 
		/// </summary>
		public bool Insert()
		{
			return (this.Table as DataAccess.Takes).Insert(this);
		}
		/// <summary>
		/// 
		/// </summary>
		public void Update()
		{
			(this.Table as DataAccess.Takes).Update(this);
		}
		/// <summary>
		/// 
		/// </summary>
		public new void Delete()
		{
			(this.Table as DataAccess.Takes).Delete(this);
		}
	}
}
